Optimal. Leaf size=147 \[ -\frac {\tan (c+d x)}{4 d \sqrt {a \cos (c+d x)+a}}+\frac {7 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{4 \sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d \sqrt {a \cos (c+d x)+a}} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.34, antiderivative size = 147, normalized size of antiderivative = 1.00, number of steps used = 7, number of rules used = 6, integrand size = 23, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.261, Rules used = {2779, 2984, 2985, 2649, 206, 2773} \[ -\frac {\tan (c+d x)}{4 d \sqrt {a \cos (c+d x)+a}}+\frac {7 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a \cos (c+d x)+a}}\right )}{4 \sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a \cos (c+d x)+a}}\right )}{\sqrt {a} d}+\frac {\tan (c+d x) \sec (c+d x)}{2 d \sqrt {a \cos (c+d x)+a}} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 206
Rule 2649
Rule 2773
Rule 2779
Rule 2984
Rule 2985
Rubi steps
\begin {align*} \int \frac {\sec ^3(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx &=\frac {\sec (c+d x) \tan (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}-\frac {\int \frac {(a-3 a \cos (c+d x)) \sec ^2(c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{4 a}\\ &=-\frac {\tan (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {\sec (c+d x) \tan (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}-\frac {\int \frac {\left (-\frac {7 a^2}{2}+\frac {1}{2} a^2 \cos (c+d x)\right ) \sec (c+d x)}{\sqrt {a+a \cos (c+d x)}} \, dx}{4 a^2}\\ &=-\frac {\tan (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {\sec (c+d x) \tan (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}+\frac {7 \int \sqrt {a+a \cos (c+d x)} \sec (c+d x) \, dx}{8 a}-\int \frac {1}{\sqrt {a+a \cos (c+d x)}} \, dx\\ &=-\frac {\tan (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {\sec (c+d x) \tan (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}-\frac {7 \operatorname {Subst}\left (\int \frac {1}{a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{4 d}+\frac {2 \operatorname {Subst}\left (\int \frac {1}{2 a-x^2} \, dx,x,-\frac {a \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{d}\\ &=\frac {7 \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {a+a \cos (c+d x)}}\right )}{4 \sqrt {a} d}-\frac {\sqrt {2} \tanh ^{-1}\left (\frac {\sqrt {a} \sin (c+d x)}{\sqrt {2} \sqrt {a+a \cos (c+d x)}}\right )}{\sqrt {a} d}-\frac {\tan (c+d x)}{4 d \sqrt {a+a \cos (c+d x)}}+\frac {\sec (c+d x) \tan (c+d x)}{2 d \sqrt {a+a \cos (c+d x)}}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] time = 31.17, size = 1791, normalized size = 12.18 \[ \text {result too large to display} \]
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
fricas [B] time = 0.80, size = 251, normalized size = 1.71 \[ \frac {7 \, {\left (\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}\right )} \sqrt {a} \log \left (\frac {a \cos \left (d x + c\right )^{3} - 7 \, a \cos \left (d x + c\right )^{2} - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} \sqrt {a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + 8 \, a}{\cos \left (d x + c\right )^{3} + \cos \left (d x + c\right )^{2}}\right ) - 4 \, \sqrt {a \cos \left (d x + c\right ) + a} {\left (\cos \left (d x + c\right ) - 2\right )} \sin \left (d x + c\right ) + \frac {8 \, \sqrt {2} {\left (a \cos \left (d x + c\right )^{3} + a \cos \left (d x + c\right )^{2}\right )} \log \left (-\frac {\cos \left (d x + c\right )^{2} + \frac {2 \, \sqrt {2} \sqrt {a \cos \left (d x + c\right ) + a} \sin \left (d x + c\right )}{\sqrt {a}} - 2 \, \cos \left (d x + c\right ) - 3}{\cos \left (d x + c\right )^{2} + 2 \, \cos \left (d x + c\right ) + 1}\right )}{\sqrt {a}}}{16 \, {\left (a d \cos \left (d x + c\right )^{3} + a d \cos \left (d x + c\right )^{2}\right )}} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
giac [B] time = 2.34, size = 371, normalized size = 2.52 \[ \frac {\sqrt {2} {\left (\frac {7 \, \sqrt {2} \sqrt {a} \log \left (\frac {{\left | 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} - 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}{{\left | 2 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} + 4 \, \sqrt {2} {\left | a \right |} - 6 \, a \right |}}\right )}{{\left | a \right |}} + \frac {8 \, \log \left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2}\right )}{\sqrt {a}} - \frac {8 \, {\left (17 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{6} \sqrt {a} - 57 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} a^{\frac {3}{2}} + 19 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a^{\frac {5}{2}} - 3 \, a^{\frac {7}{2}}\right )}}{{\left ({\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{4} - 6 \, {\left (\sqrt {a} \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right ) - \sqrt {a \tan \left (\frac {1}{2} \, d x + \frac {1}{2} \, c\right )^{2} + a}\right )}^{2} a + a^{2}\right )}^{2}}\right )}}{16 \, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maple [B] time = 0.68, size = 671, normalized size = 4.56 \[ -\frac {\cos \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \left (-4 a \left (-8 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right )+7 \ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right )+7 \ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right )\right ) \left (\sin ^{4}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+\left (-32 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a +28 \ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a +28 \ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a -4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right ) \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )+8 \sqrt {2}\, \ln \left (\frac {4 \sqrt {a}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}+4 a}{\cos \left (\frac {d x}{2}+\frac {c}{2}\right )}\right ) a -7 \ln \left (-\frac {4 \left (\sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}-a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+2 a \right )}{-2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a -7 \ln \left (\frac {4 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}+4 a \sqrt {2}\, \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+8 a}{2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}}\right ) a -2 \sqrt {2}\, \sqrt {a \left (\sin ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, \sqrt {a}\right )}{2 a^{\frac {3}{2}} \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )-\sqrt {2}\right )^{2} \left (2 \cos \left (\frac {d x}{2}+\frac {c}{2}\right )+\sqrt {2}\right )^{2} \sin \left (\frac {d x}{2}+\frac {c}{2}\right ) \sqrt {a \left (\cos ^{2}\left (\frac {d x}{2}+\frac {c}{2}\right )\right )}\, d} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
maxima [F(-1)] time = 0.00, size = 0, normalized size = 0.00 \[ \text {Timed out} \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
mupad [F] time = 0.00, size = -1, normalized size = -0.01 \[ \int \frac {1}{{\cos \left (c+d\,x\right )}^3\,\sqrt {a+a\,\cos \left (c+d\,x\right )}} \,d x \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
sympy [F] time = 0.00, size = 0, normalized size = 0.00 \[ \int \frac {\sec ^{3}{\left (c + d x \right )}}{\sqrt {a \left (\cos {\left (c + d x \right )} + 1\right )}}\, dx \]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________